package com.File文件;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileCopy {
    public static void main(String[] args) throws IOException {
        //获得文件的输入和输出流
        FileInputStream fis=new FileInputStream("D:\\黑马视频\\" +
                "file\\father\\nihao\\index.txt");
        FileOutputStream fos=new FileOutputStream("D:\\黑马视频" +
                "\\file\\father\\hello\\hello.txt",true);
       //byte[] bys=new byte[4096];
        int len;
        while ((len=fis.read())!=-1) {
        fos.write(len);
        }
        System.out.println("赋值文本文件结束");

    }
}
